<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core">
<h:body>
	<ui:composition template="/WEB-INF/layout/layout.xhtml">
		<ui:define name="content">
			<h:dataTable value="#{commands.commands}" var="command">
				<h:column>
					<f:facet name="header">Id</f:facet>
					#{command.id}
				</h:column>
				<h:column>
				<f:facet name="header">Status</f:facet>
					#{command.status}
				</h:column>
				<h:column>
					<f:facet name="header">Command</f:facet>
					<h:outputText value="#{command}"/>
				</h:column>
				<h:column>
					<f:facet name="header">Result status</f:facet>
					#{command.handledStatus}
				</h:column>
				<h:column>
					<f:facet name="header">Result message</f:facet>
					<pre>
					#{command.handledMessage}
					</pre>
				</h:column>
				<h:column>
					<h:commandButton action="#{commands.remove}">
						<f:setPropertyActionListener target="#{commands.commandId}" value="#{command.id}" />
					</h:commandButton>
				</h:column>
			</h:dataTable>
		</ui:define>
	</ui:composition>
</h:body>
</html>
